package dyyx.servlet;
import java.io.IOException;
import java.time.LocalDateTime;

import javax.servlet.annotation.WebInitParam;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@WebServlet(name = "helloServlet2", urlPatterns = "/hello2", asyncSupported = true,
initParams = {
@WebInitParam(name = "name", value = "dyyx"),
 })
public class HelloServlet2 extends HttpServlet {

	@Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws IOException {
        String name = getServletConfig().getInitParameter("name");
        resp.getOutputStream().println(this.getClass() +" name is " + name+" "+LocalDateTime.now());
    }
}
